<script>
	//$('#nip').focus();
	$(document).ready(function(){
		
		generate_nis<?=$objectid?> = function(){
			$.get('<?=base_url()?>sd/psb/daftar_ulang/generate_nis', function(result, stat){
				$('#nis<?=$objectid?>').val(result);
			});
		}
		
	});
</script>
<form id="form1_daftar_ulang" name="form1_daftar_ulang" method="post" style="margin:10px">
	<input type="hidden" name="id" id="id" value="<?=$id?>">
	
	<h4 class="labeltitle">Data Siswa</h4>
	<hr class="labelseparator">
	<div class="fitem" >
		<label style="width:110px;padding:2px 0 1px 3px;">No Pendaftaran</label>: <b><?=$no_pendaftaran?></b>
	</div>
	<div class="fitem" >
		<label style="width:110px;padding:2px 0 1px 3px;">Nama</label>: <b><?=$nama?></b>
	</div>
	<div class="fitem" >
		<label style="width:110px;padding:2px 0 1px 3px;">NIS</label>: 
		<input name="nis" id="nis<?=$objectid?>" size="15" value="<?=$nis?>"><img onclick="javascript:generate_nis<?=$objectid?>()" src="<?=base_url()?>/asset/images/reload.png" style="cursor:pointer;margin-left:3px;" title="Ganti NIS"/>
	</div>
	
	<div class="fitem" >
        <h4 class="labeltitle">Persyaratan</h4>
		<hr class="labelseparator">
        <?=$this->mdl_calon_siswa->generate_persyaratan('edit', $id)?>
    </div>
	
	<h4 class="labeltitle">Pembayaran</h4>
	<hr class="labelseparator">
	
	<table border="0" cellpadding="2" cellspacing="2" width="500">
		<tr>
			<td width="30px"><b>No.</b></td>
			<td><b>Rincian</b></td>
			<td width="20px">&nbsp;</td>
			<td width="90px"></td>
		</tr>
		<?php 
			$i=1;
			$total=0;
			foreach($pembayaran->result() as $row){
		?>
		<tr>
			<td valign="top"><?=$i?></td>
			<td valign="top"><?=$row->pembayaran?></td>
			<td valign="top" align="right">Rp.</td>
			<td valign="top" align="right"><?=$row->nominal?></td>
		</tr>
		<?php
				$total += $row->nominal;
				$i++;
			}
			$total += $uang_sumbangan;
			
		?>
		<tr>
			<td valign="top"><?=$i?></td>
			<td valign="top">Uang Sumbangan</td>
			<td valign="top" align="right">Rp.</td>
			<td valign="top" align="right"><?=$uang_sumbangan?></td>
		</tr>
		<tr>
			<td></td>
			<td align="right"><b>Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td>
			<td>Rp.</td>
			<td align="right"><b><?=$total?></b></td>
		</tr>
	</table>
	<br>
	<div class="fitem" >
		<label style="width:110px;padding:2px 0 1px 3px;">Keterangan</label>: 
		<textarea name="keterangan" cols="40" rows="4"></textarea>
	</div>
</form>


